﻿using System.Windows;
using Kiva7.DataRequests;

namespace Kiva7.Pages
{
    public partial class TeamDetailControl : Kiva7.Controls.BaseUserControl
    {
        public TeamDetailControl()
        {
            InitializeComponent();
        }

        private void ButtonClick(object sender, RoutedEventArgs e)
        {

            TeamDetailRequest team = DataContext as TeamDetailRequest;

            if (team != null
                && team.SingleData != null
                && team.SingleData.Image != null)
            {
                DoNavigate(FullImagePage.GetPageUrl(team.SingleData.Image.Id));
            }

            //WebBrowserTask task = new WebBrowserTask();
            //task.URL = string.Format("http://www.kiva.org/lender/", TeamId.Text);
            //task.Show();

        }

        internal void TranslateTextWithDetect()
        {
            tbkLoanBecause.TranslateTextWithDetect();
            tbDescriptionTranslation.TranslateTextWithDetect();
        }
    }
}
